//
//  FQDRemindCell.m
//  FakeQDaily
//
//  Created by mewxiv on 9/21/16.
//  Copyright © 2016 Xensius. All rights reserved.
//

#import "FQDRemindCell.h"

#import "Masonry.h"

@interface FQDRemindCell ()

@property (nonatomic, strong) UILabel *remindLabel;
@property (nonatomic, strong) UIView *underline;

@end

@implementation FQDRemindCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self prepareCell];
        [self prepareConstraints];
    }
    return self;
}

- (void)prepareCell
{
    self.backgroundColor = [UIColor whiteColor];
    
    _remindLabel = [[UILabel alloc] init];
    _remindLabel.font = FQDRegularFontWithSize(12.0f);
    _remindLabel.text = @"登录后可看到哪些栏目你已关注";
    _remindLabel.textColor = [UIColor blackColor];
    _remindLabel.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:_remindLabel];
    
    _underline = [[UIView alloc] init];
    _underline.backgroundColor = FQDHighlightColor;
    [self.contentView addSubview:_underline];
}

- (void)prepareConstraints
{
    WeakSelf;
    [_remindLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(weakSelf.contentView);
        make.height.equalTo(@15);
    }];
    
    [_underline mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(weakSelf.remindLabel).offset(-1);
        make.top.equalTo(weakSelf.remindLabel.mas_bottom);
        make.size.mas_equalTo(CGSizeMake(25, 1.5));
    }];
}

+ (NSString *)reuseId
{
    return @"FQDRemindCelll";
}

@end
